Skip to content

fix: prevent accidental multiple CSV downloads#721

Open
Nilamma19 wants to merge 1 commit into
Charushi06:mainfrom
Nilamma19:fix-download-confirmation
Open

fix: prevent accidental multiple CSV downloads#721
Nilamma19 wants to merge 1 commit into
Charushi06:mainfrom
Nilamma19:fix-download-confirmation

Conversation

@Nilamma19
Copy link
Copy Markdown

Related Issue

Closes #483

Summary

Fixes the StudyPlan CSV export flow by preventing automatic downloads when users click the Download Data sidebar option. Users must now explicitly confirm the export before the CSV file is generated.

Changes Made

  • Removed immediate CSV download trigger from sidebar selection
  • Added export confirmation panel/modal for download action
  • Added dedicated Download CSV button
  • Separated navigation action from export action
  • Added protection against duplicate downloads from repeated clicks
  • Added loading/disabled state during export process
  • Preserved existing CSV export functionality and file format
  • Improved overall user experience and predictability

Testing

Tested locally using the following scenarios:

  • Opened StudyPlan application
  • Navigated to sidebar and clicked Download Data
  • Verified no automatic download occurs
  • Verified export panel/modal opens correctly
  • Clicked Download CSV and confirmed CSV downloads successfully
  • Repeated sidebar clicks and confirmed duplicate files are not created
  • Tested modal close/cancel behavior
  • Checked browser console for errors

Screenshots

After changes
Screenshot (12)

Before

  • Clicking Download Data immediately downloaded CSV files
  • Multiple clicks generated duplicate files

After

  • Clicking Download Data opens confirmation panel
  • CSV downloads only after explicit confirmation

Checklist

  • [✔] Code follows project style
  • [✔]Tested locally
  • [✔] No unrelated changes included
  • [✔] Documentation updated (if applicable)

Signed-off-by: Nilamma <nilammaborge@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent automatic file downloads when clicking "Download Data" and require explicit confirmation

1 participant